package demoSingletion;

public class Principal {
    private static Principal instance;
    private String name;

    private Principal(){
        name = "王校长";
    }

    public static Principal getInstance(){
        if(instance == null){
            instance = new Principal();
        }

        return instance;
    }

    public void announcement(String message){
        System.out.println(name + "通知：" + message);
    }

    public void approveDocument(String file){
        System.out.println(name + "审批通过：" + file);
    }
}
